package floatx

import "math"

const Accuracy = 0.00001

func Neq(a, b float64) bool {
	return !Eq(a, b)
}

func Eq(a, b float64) bool {
	return math.Abs(a-b) < Accuracy
}

func Gt(a, b float64) bool {
	return math.Max(a, b) == a && math.Abs(a-b) > Accuracy
}

func Lt(a, b float64) bool {
	return math.Max(a, b) == b && math.Abs(a-b) > Accuracy
}

func Geq(a, b float64) bool {
	return math.Max(a, b) == a || math.Abs(a-b) < Accuracy
}

func Leq(a, b float64) bool {
	return math.Max(a, b) == b || math.Abs(a-b) < Accuracy
}
